package com.wxapp.sale.api.pojo.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.wxapp.common.constant.base.IBaseEntity;
import com.wxapp.sale.api.enums.order.OrderSourceEnum;
import com.wxapp.sale.api.enums.order.OrderStateEnum;
import com.wxapp.sale.api.enums.order.OrderTypeEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @author: lgl
 * @Description 订单表封装类
 * @Datetime 2022-06-02 09:29:10
 * @Modified By
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Schema(description = "订单表")
@TableName("wxapp_order")
public class OrderDO extends IBaseEntity implements Serializable {
    /**
     * 订单编号
     */
    private String code;
    /**
     * 支付账号
     */
    private String payAccount;
    /**
     * 地址id
     */
    private String addressId;
    /**
     * 订单类型
     */
    private OrderTypeEnum type;
    /**
     * 订单状态
     */
    private OrderStateEnum orderState;
    /**
     * 订单来源
     */
    private OrderSourceEnum orderSource;
    /**
     * 订单价格/积分
     */
    private BigDecimal price;
    /**
     * 折扣金额/积分
     */
    private BigDecimal discountPrice;
    /**
     * 支付方式
     */
    private String payWay;
    /**
     * 支付时间
     */
    private LocalDateTime payTime;
}

